<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="../../base.jsp"%>
<!DOCTYPE html>
<html>

<head>
    <!-- 页面meta -->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>黑马面面管理系统</title>
    <meta name="description" content="AdminLTE2定制版">
    <meta name="keywords" content="AdminLTE2定制版">
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no" name="viewport">
    <!-- 页面meta /-->
</head>
<body>
<div id="frameContent" class="content-wrapper" style="margin-left:0px;">
    <!-- 内容头部 -->
    <section class="content-header">
        <h1>
            部门管理
            <small>编辑部门信息</small>
        </h1>
        <ol class="breadcrumb">
            <li><a href="all-admin-index.html"><i class="fa fa-dashboard"></i> 首页</a></li>
            <li><a href="all-order-manage-list.html">部门管理</a></li>
            <li class="active">编辑部门信息</li>
        </ol>
    </section>
    <!-- 内容头部 /-->

    <!-- 正文区域 -->
    <section class="content">

        <!--订单信息-->
        <div class="panel panel-default">
            <div class="panel-heading">部门信息</div>
            <form id="editForm" action="${ctx}/system/dept?operation=edit" method="post">
                <input type="hidden" name="id" value="${dept.id}">
                <div class="tab-pane active" id="tab-form">
                    <div class="row data-type">
                        <div class="col-md-2 title">部门名称</div>
                        <div class="col-md-10 data">
                            <input type="text" class="form-control" placeholder="部门名称" name="deptName" value="${dept.deptName}">
                        </div>
                        <div class="col-md-2 title">所属部门</div>
                        <div class="col-md-10 data line-height36">
                            <select class="form-control" name="parentId">
                                <option value="">请选择</option>
                                <c:forEach items="${deptList}" var="item">
                                    <option ${dept.parent.id == item.id ?'selected':''} value="${item.id}">${item.deptName}</option>
                                </c:forEach>
                            </select>
                        </div>
                        <div class="col-md-2 title">状态</div>
                        <div class="col-md-10 data">
                            <div class="form-group form-inline">
                                <div class="radio"><label><input type="radio" ${dept.state==0?'checked':''} name="state" value="0">停用</label></div>
                                <div class="radio"><label><input type="radio" ${dept.state==1?'checked':''} name="state" value="1">启用</label></div>
                            </div>
                        </div>
                        <div class="col-md-2 title"></div>
                        <div class="col-md-10 data text-center">
                            <button type="button" onclick='document.getElementById("editForm").submit()'  class="btn bg-maroon">保存</button>
                            <button type="button" class="btn bg-default" onclick="history.back(-1);">返回</button>
                        </div>
                    </div>
                </div>
            </form>
        </div>

    </section>
    <!-- 正文区域 /-->

</div>
<!-- 内容区域 /-->
</body>

</html>